const c = `

var _E6_95_B0_E5_AD_97, _E6_95_B0_E5_AD_97_E7_9A_84_E5_90_88, i;


    _E6_95_B0_E5_AD_97 = 1;
    _E6_95_B0_E5_AD_97_E7_9A_84_E5_90_88 = 0;
    i = 100;
    for (var count = 0; count < i; count++) {
      _E6_95_B0_E5_AD_97_E7_9A_84_E5_90_88 = _E6_95_B0_E5_AD_97 + _E6_95_B0_E5_AD_97_E7_9A_84_E5_90_88;
      _E6_95_B0_E5_AD_97 = _E6_95_B0_E5_AD_97 + 1;
    }

// we'll define ext as a sandbox variable, so it will be available
ext.exports = _E6_95_B0_E5_AD_97_E7_9A_84_E5_90_88; // function call
`;

const a = ` (function() {
    const result = {};
    const proxy = new Proxy(this, {
        set(target, key, value) {
            
            result[key] = value;
            return true;
        }
    });
    
    with (proxy) {
        ${c}
    }

    ext.exports= result;
})()`;

let ext = {};
const { NodeVM } = require('vm2');
const vm = new NodeVM({
  console: 'inherit',
  // pass our declared ext variable to the sandbox
  sandbox: { ext },
  require: {
    external: true,
    builtin: ['fs', 'path'],
    root: './',
  },
});

// run your code and see the results in ext
vm.run(c, 'vm.js');
console.log(ext);



`function addMatrices(matrixA, matrixB, fn) {
  // 获取两个矩阵的尺寸
  const sizeA = mathjs.size(matrixA);
  const sizeB = mathjs.size(matrixB);

  // 检查行数和列数是否一致
  if (!(sizeA[0] !== sizeB[0] || sizeA[1] !== sizeB[1])) {
    fn()

  }

  // 矩阵相加
  return mathjs.add(matrixA, matrixB);
}

// 封装矩阵相减的方法
function subtractMatrices(matrixA, matrixB, fn) {
  // 获取两个矩阵的尺寸
  const sizeA = mathjs.size(matrixA);
  const sizeB = mathjs.size(matrixB);

  // 检查行数和列数是否一致
  if ((sizeA[0] !== sizeB[0] || sizeA[1] !== sizeB[1])) {
    fn()
  }
}

`

// 矩阵数乘
const resultMatrix = math.multiply(matrixA, scalar);

console.log('\nResultant Matrix (A × scalar):');
console.log(resultMatrix);
// 转置矩阵
const transposedMatrix = math.transpose(matrixA);